package com.hvgroup.modules.sanic.domain.po;

import com.hvgroup.base.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 模型开发平台配置表实体类
 * <p>
 * 映射表：llm_model_config
 * </p>
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@Entity
@Table(name = "llm_model_config")
public class LlmModelConfig extends BaseEntity implements Serializable {

    /**
     * 主键ID
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    private Long id;

    /**
     * 平台名称
     */
    @Column(name = "platform_name", length = 30)
    private String platformName;

    /**
     * 平台类型（1:dify，2:coze）
     */
    @Column(name = "platform_type")
    private Integer platformType;

    /**
     * 接入方式（apike:1，oauth:2）
     */
    @Column(name = "access_type")
    private Integer accessType;

    /**
     * 状态
     */
    @Column(name = "state")
    private Integer state;

    /**
     * api状态（是否启用API）
     */
    @Column(name = "enable_api", nullable = false)
    private Boolean enableApi;

    /**
     * 知识库API Key
     */
    @Column(name = "datasets_api_key", length = 128)
    private String datasetsApiKey;

    /**
     * 应用API Key
     */
    @Column(name = "apps_api_key", length = 128)
    private String appsApiKey;

    /**
     * 认知token
     */
    @Column(name = "access_token", length = 128)
    private String accessToken;

    /**
     * 平台地址
     */
    @Column(name = "platform_addr", length = 255)
    private String platformAddr;

    /**
     * 大模型开发平台描述
     */
    @Lob
    @Column(name = "platform_desc")
    private String platformDesc;

}
